package com.aspose.cells;

public class PatternFill extends Fill {
   private Object c;
   private Workbook d;
   private int e;
   zakp a;
   zakp b;

   PatternFill(Object parent, Workbook workbook) {
      this.c = parent;
      this.d = workbook;
      this.a = new zakp(true);
      this.b = new zakp(true);
   }

   public int getPattern() {
      return this.e;
   }

   public void setPattern(int value) {
      this.e = value;
   }

   public Color getBackgroundColor() {
      return this.getPattern() == 1 ? this.getForegroundColor() : this.a.b(this.d);
   }

   public void setBackgroundColor(Color value) {
      this.a.a(2, value.toArgb());
      if (this.c instanceof Area) {
         Area var2 = (Area)this.c;
         var2.b();
      }

   }

   public CellsColor getBackgroundCellsColor() {
      return this.getPattern() == 1 ? this.getForegroundCellsColor() : new CellsColor(this.d, this.a);
   }

   public void setBackgroundCellsColor(CellsColor value) {
      this.a = value.a;
      if (this.c instanceof Area) {
         Area var2 = (Area)this.c;
         var2.b();
      }

   }

   public Color getForegroundColor() {
      return this.b.b(this.d);
   }

   public void setForegroundColor(Color value) {
      this.b.a(2, value.toArgb());
      if (this.c instanceof Area) {
         Area var2 = (Area)this.c;
         var2.b();
      }

   }

   public CellsColor getForegroundCellsColor() {
      return new CellsColor(this.d, this.b);
   }

   public void setForegroundCellsColor(CellsColor value) {
      this.b = value.a;
      if (this.c instanceof Area) {
         Area var2 = (Area)this.c;
         var2.b();
      }

   }

   int a() {
      return zakp.e(this.b);
   }

   void a(int var1) {
      this.b = zakp.a(this.b, var1);
   }

   public double getForeTransparency() {
      return zakp.d(this.b);
   }

   public void setForeTransparency(double value) {
      this.b = zakp.a(this.b, value);
   }

   int b() {
      return zakp.e(this.a);
   }

   public double getBackTransparency() {
      return zakp.d(this.a);
   }

   public void setBackTransparency(double value) {
      this.a = zakp.a(this.a, value);
   }

   void a(PatternFill var1) {
      this.e = var1.e;
      if (var1.a.b() == 3 && var1.d != this.d) {
         this.a.a(2, var1.a.c(var1.d));
      } else {
         this.a.f(var1.a);
      }

      if (var1.b.b() == 3 && var1.d != this.d) {
         this.b.a(2, var1.b.c(var1.d));
      } else {
         this.b.f(var1.b);
      }

   }

   boolean b(PatternFill var1) {
      if (this.e != var1.e) {
         return false;
      } else if (!this.a.g(var1.a)) {
         return false;
      } else {
         return this.b.g(var1.b);
      }
   }
}
